package com.jhl.seckill.config;

import com.alibaba.csp.sentinel.slots.block.RuleConstant;
import com.alibaba.csp.sentinel.slots.block.authority.AuthorityRule;
import com.alibaba.csp.sentinel.slots.block.authority.AuthorityRuleManager;

import java.util.Collections;

public class WhiteAuthority {

    public static void main(String[] args) {
        AuthorityRule rule = new AuthorityRule();
        rule.setResource("/goods/list");
        rule.setLimitApp("");
        rule.setStrategy(RuleConstant.AUTHORITY_WHITE);
        AuthorityRuleManager.loadRules(Collections.singletonList(rule));
    }
}
